/*
 * Copyright (c) 2010-2011 NOO. All Rights Reserved.
 * [Id:RoleCmp.java  2011-11-04 下午8:54 poplar.yfyang ]
 */
package org.mumu.pawn.cmps;

import org.mumu.pawn.fm.dm.LazyPawnDataModel;
import org.mumu.pawn.domain.Role;

import java.io.Serializable;

/**
 * <p>
 * 角色管理.
 * </p>
 *
 * @author poplar.yfyang
 * @version 1.0 2011-11-04 下午8:54
 * @since JDK 1.5
 */
public interface RoleCmp extends Serializable {
    /**
     * Create New Role Or Update Exist Role
     *
     * @param role Role
     */
    void saveOrUpdateRole(Role role);

    /**
     * Delete Role
     *
     * @param roleId id for Role
     */
    void deleteRole(long roleId);

    /**
     * Get Role's List DataModel
     * @return DataModel
     */
    LazyPawnDataModel getRoleDataModal();

    /**
     * Get Role for id
     * @param roleId  role's id
     * @return Role
     */
    Role findRole(long roleId);

}
